package main

import (
	"log"
	"net/http"
)

// 编译: go build
//   在当前目录生成 http-server
// 测试方法:
// $ ./http-server
// $ curl -X POST http://localhost:5000/players/Pepper
// $ curl -X POST http://localhost:5000/players/Pepper
// $ curl -X POST http://localhost:5000/players/Pepper
// $ curl http://localhost:5000/players/Pepper
// Output: 3
func main() {
	server := &PlayerServer{NewInMemoryPlayerStore()}

	if err := http.ListenAndServe(":5000", server); err != nil {
		log.Fatalf("could not listen on port 5000 %v", err)
	}
}

